Frontend Forever App
We have a mobile app for you to download and use. And you can unlock many features in the app.
Get it now
Intall Later
Run
HTML
CSS
Javascript
Output
Click to toggle popover
@import url('https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css'); html, body { color: #fff; background-color: blue; display: flex; justify-content: center; align-items: center; height: 100%; } /* !!!! Popover !!!! */ .popover { --bs-popover-header-padding-y: 0; --bs-popover-header-padding-x: 20px; --bs-popover-header-bg: var(--bs-dark); --bs-popover-header-font-size: 14px; color: var(--bs-white); }
$(document).ready(function() { var options = { html: true, title: "Optional: HELLO(Will overide the default-the inline title)", //html element //content: $("#popover-content") content: $('[data-name="popover-content"]') //Doing below won't work. Shows title only //content: $("#popover-content").html() } var exampleEl = document.getElementById('popover-btn') var popover = new bootstrap.Popover(exampleEl, options) })